package com.cosmoplat.xikai.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * @TableName device_log
 */
@Data
public class DeviceLog implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 产品id
     */
    private Long productId;

    /**
     * 设备id
     */
    private Long deviceId;

    /**
     * 物模型id
     */
    private Long deviceThingModelId;

    /**
     * 类型  1:在线状态 2:参数 3:报警
     */
    private Integer type;

    /**
     *
     */
    private String val;
    /**
     *  DeviceRunStatusEnum
     */
    private String deviceStatus;

    /**
     * 时间
     */
    private Date dataTime;

    /**
     * 时间戳
     */
    private Date ts;

    private static final long serialVersionUID = 1L;


    public DeviceLog(Long deviceId, Long deviceThingModelId, String val, Integer type, Date dataTime, String deviceStatus, Date ts) {
        this.deviceId = deviceId;
        this.deviceThingModelId = deviceThingModelId;
        this.val = val;
        this.type = type;
        this.dataTime = dataTime;
        this.deviceStatus = deviceStatus;
        this.ts = ts;
    }

    public DeviceLog() {
    }
}